var http=require('http');
var otherfun=require('./models/other.js')
http.createServer(function(req,res){
    res.writeHead(200,{'Content-Type':'text/html;charset=utf-8'});
    if(req.url!=='/favicon.ico'){
        // fun1(res);
        otherfun.fun3(res);
        // 或者下边这种用字符串调用对应的函数
        otherfun['fun3'](res);
        funname='fun2';
        otherfun[funname](res);
        res.end();
    }
}).listen(3000);
console.log('aaa');
function fun1(res){
    console.log(fun1);
    res.write('hell0');
}